package unit03;

public class Demo01
{
   //求1！+2！+3！+4！+5！+6！+7！+8！+9！+10！的和

    public static void main(String[] args) {
        int sumAll = 0;
        for (int i = 1; i <= 10; i++) {
            int sum = 0;
            for (int j = 1; j <= i; j++) {
                sum += j;
                sumAll += sum;
            }
            System.out.println(i + "!=" + sum);
        }
        System.out.println("1！+2！+3！+4！+5！+6！+7！+8！+9！+10！的和为：" + sumAll);
    }


}

